home *** CD-ROM | disk | FTP | other *** search
/ Workbench Add-On / Workbench Add-On - Volume 1.iso / Dev / Oberon / source / amiga / Parallel.mod < prev    next >
Text File  |  1995-06-29  |  3KB  |  93 lines

  1. (**************************************************************************
  2.  
  3.      $RCSfile: Parallel.mod $
  4.   Description: Interface to parallel.device
  5.  
  6.    Created by: fjc (Frank Copeland)
  7.     $Revision: 3.8 $
  8.       $Author: fjc $
  9.         $Date: 1995/06/04 23:13:14 $
  10.  
  11.   $VER: parallel.h 36.1 (10.5.90)
  12.   Includes Release 40.15
  13.  
  14.   (C) Copyright 1985-1993 Commodore-Amiga, Inc.
  15.       All Rights Reserved
  16.  
  17.   Oberon-A interface Copyright © 1994-1995, Frank Copeland.
  18.   This file is part of the Oberon-A Interface.
  19.   See Oberon-A.doc for conditions of use and distribution.
  20.  
  21. ***************************************************************************)
  22.  
  23. <* STANDARD- *>
  24.  
  25. MODULE [2] Parallel;
  26.  
  27. IMPORT e := Exec, s := Sets;
  28.  
  29.  
  30. (*
  31. **
  32. **      parallel.device I/O request structure information
  33. **
  34. *)
  35.  
  36. TYPE
  37.  
  38.   IOPArrayPtr * = POINTER TO IOPArray;
  39.   IOPArray * = ARRAY 8 OF CHAR;
  40.  
  41. (******************************************************************)
  42. (* CAUTION !!  IF YOU ACCESS the parallel.device, you MUST (!!!!) use
  43.    an IOExtPar-sized structure or you may overlay innocent memory !! *)
  44. (******************************************************************)
  45.  
  46. TYPE
  47.  
  48.   IOExtParPtr * = POINTER TO IOExtPar;
  49.   IOExtPar * = RECORD (e.IORequestBase)
  50.     ioPar *      : e.IOStdReq;
  51.     pExtFlags *  : s.SET32;  (* (not used) flag extension area *)
  52.     status *     : s.SET8;   (* status of parallel port and registers *)
  53.     parFlags *   : s.SET8;   (* see PARFLAGS bit definitions below *)
  54.     pTermArray * : IOPArray; (* termination character array *)
  55.   END; (* IOExtPar *)
  56.  
  57. CONST
  58.  
  59.   shared *     = 5;         (* ParFlags non-exclusive access bit *)
  60.   slowMode *   = 4;         (*    "     slow printer bit *)
  61.   fastMode *   = 3;         (*    "     fast I/O mode selected bit *)
  62.   radBoogie *  = 3;         (*    "     for backward compatibility *)
  63.   ackMode *    = 2;         (*    "     ACK interrupt handshake bit *)
  64.   eofMode *    = 1;         (*    "     EOF mode enabled bit *)
  65.  
  66.   queued *     = 6;         (* ioFLAGS rqst-queued bit *)
  67.   abort *      = 5;         (*    "     rqst-aborted bit *)
  68.   active *     = 4;         (*    "     rqst-qued-or-current bit *)
  69.   rwDir *      = 3;         (* ioSTATUS read=0,write=1 bit *)
  70.   parSel *     = 2;         (*    "     printer selected on the A1000 *)
  71.                             (* printer selected & serial "Ring Indicator"
  72.                                on the A500 & A2000.  Be careful when
  73.                                making cables *)
  74.   paperOut *   = 1;         (*    "     paper out bit *)
  75.   parBusy *    = 0;         (*    "     printer in busy toggle bit *)
  76. (* Note: previous versions of this include files had bits 0 and 2 swapped *)
  77.  
  78.   parallelName * = "parallel.device";
  79.  
  80.   query *             = e.nonstd;
  81.   setParams *         = e.nonstd+1;
  82.  
  83.   devBusy *          = 1;
  84.   bufTooBig *        = 2;
  85.   invParam *         = 3;
  86.   lineErr *          = 4;
  87.   notOpen *          = 5;
  88.   portReset *        = 6;
  89.   initErr *          = 7;
  90.  
  91.  
  92. END Parallel.
  93.